import http from '../index'
export const getMusicList = (data,config)=>{
   return http.get('/2api/playlist/detail',data,config)
}
export const getSearch = (data)=>{
   return http.get('/api/music/search',data)
}
// export const getPlayMusic = (data)=>{
//    return http.get('https://api.imjad.cn/cloudmusic/?type=song&id=209746&br=128000')
// }
export const getPlayMusic = (data)=>{
   let params = {
      type:'song',
      br:'128000'
   }
   params.type = data.type || 'song';
   params = Object.assign(params,data)
   return http.get('https://api.imjad.cn/cloudmusic',params)
}
export const getToplist = (data,config)=>{
   return http.get('/2api/toplist',data,config)
}
export const getToplistArtist = (data,config)=>{
   return http.get('/2api/toplist/artist',data,config)
}
export const getPersonalizedMv = (data,config)=>{
   return http.get('/2api/personalized/mv',data,config)
}
export const getMvDetail = (data)=>{
   let params = {
      type:'mv',
   }
   params = Object.assign(params,data)
   return http.get('/api.imjad.cn/cloudmusic',params)
}